package com.jt.demo3;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

public class Snake {
    public Snake(){
        System.out.println("蛇蛋生了");
    }
    @PostConstruct
    public void init(){
        System.out.println("蛇出来四处溜达了");
    }
    public  void eat(){
        System.out.println("蛇在捕捉猎物吃");
    }
    @PreDestroy
    public  void destroy(){
        System.out.println("蛇吃死了");
    }
}
